<script lang="ts" setup>
import { computed } from 'vue';
const props = defineProps({
    name: {
        type: String,
        required: true,
    },
    prefix: {
        type: String,
        default: 'icon',
    },
});
const iconName = computed(() => {
    return props.name.indexOf(`${props.prefix}-`) > -1
        ? props.name
        : `${props.prefix}-${props.name}`;
});
</script>


<template>
    <n-icon>
        <svg aria-hidden="true">
            <use :xlink:href="`#${iconName}`"></use>
        </svg>
    </n-icon>
</template>
